package iha.standard;

import iha.framework.*;
import java.util.*;

import org.junit.*;
import static org.junit.Assert.*;

public class SearchSubSupplierMock1 implements ISearchSubSupplier 
{
    private boolean called = false;

    public LinkedList<IItem> LookUpItem(final long partnumber, final String description)
    {
	IItem i = new IItem()
	    {
		public int getSubSupplier(){return 0;}
		public void setSubSupplier(int supplier){}
		
		public long getPartNumber(){return partnumber;}
		public void setPartNumber(long number){}
		
		public String getDescription(){return description;}
		public void setDescription(String description){}
		
		public Date getHit(){return new Date();}  //trivially fresh item :))
		public void setHit(Date date){}
	    };
	
	this.called = true;

	LinkedList<IItem> llist = new LinkedList<IItem>();
	llist.add(i);
	return llist;     
    }
    
    public boolean success()
    {
	return called;
    }
}
